<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串案例</title>
</head>

<body>
    <script>
        var hero = prompt('请选择您的的英雄角色');
        var leval = prompt('输入英雄等级');
        console.log(typeof leval);
        console.log("您选择的" + hero +"英雄"+ "现在" + leval + "级了!");
    </script>
</body>

</html>